﻿using LiveChartsCore.SkiaSharpView.SKCharts;
using System.Windows;

namespace LiveCharts2_Demo.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
        //保存图片
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var skChart = new SKCartesianChart(cartesianChart) { Width = 900, Height = 600, };
            string path = System.IO.Path.Combine(@"C:\Users\Admin\Desktop", "222.png");
            skChart.SaveImage(path, SkiaSharp.SKEncodedImageFormat.Png);
        }
    }
}
